package com.kaiwukj.android.ufamily.mvp.http.entity.result;

import com.kaiwukj.android.ufamily.mvp.http.entity.base.BaseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * 装修订单
 */
public class GMOrderResult extends BaseBean {
    /**
     * "id": 7,
     * "projectType": null,
     * "projectName": null,
     * "startDate": null,
     * "projectPhase": null,
     * "decorationArea": 564,
     * "decorationStyle": 2,
     * "orderAmount": 120,
     * "decorationAddress": "很过分一个"
     */

    private Integer id;
    private Integer projectType;
    private String projectName;
    private String startDate;
    private Integer projectPhase;//项目阶段 1：开工准备 2：拆改阶段 3：水电阶段 4：泥工阶段 5：木工阶段 6：刮瓷阶段 7：安装阶段 8：完工阶段
    private Float decorationArea;
    private Integer decorationStyle;//装修风格 1：新中式 2：传统中式 3：现代简约 4：现代轻奢 5：北欧风 6：意式极简 7：地中海 8：工业风 9：欧式 10：美式 11：其他
    private Double orderAmount;
    private String decorationAddress;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getProjectType() {
        return projectType == null ? 0 : projectType;
    }

    public void setProjectType(Integer projectType) {
        this.projectType = projectType;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getStartDate() {
        return startDate == null ? "" : startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public Integer getProjectPhase() {
        return projectPhase == null ? 0 : projectPhase;
    }

    public void setProjectPhase(Integer projectPhase) {
        this.projectPhase = projectPhase;
    }

    public String getProjectPhaseStr() {
        if (getProjectPhase() == 1) {
            return "开工准备";
        } else if (getProjectPhase() == 2) {
            return "拆改阶段";
        } else if (getProjectPhase() == 3) {
            return "水电阶段";
        } else if (getProjectPhase() == 4) {
            return "泥工阶段";
        } else if (getProjectPhase() == 5) {
            return "木工阶段";
        } else if (getProjectPhase() == 6) {
            return "刮瓷阶段";
        } else if (getProjectPhase() == 7) {
            return "安装阶段";
        } else if (getProjectPhase() == 8) {
            return "完工阶段";
        }
        return "开工准备";
    }

    public Float getDecorationArea() {
        return decorationArea == null ? 0 : decorationArea;
    }

    public void setDecorationArea(Float decorationArea) {
        this.decorationArea = decorationArea;
    }

    public Integer getDecorationStyle() {
        return decorationStyle;
    }

    public void setDecorationStyle(Integer decorationStyle) {
        this.decorationStyle = decorationStyle;
    }

    public String getDecorationStyleStr() {
        if (getDecorationStyle() == 1) {
            return "新中式";
        } else if (getDecorationStyle() == 2) {
            return "传统中式";
        } else if (getDecorationStyle() == 3) {
            return "现代简约";
        } else if (getDecorationStyle() == 4) {
            return "现代轻奢";
        } else if (getDecorationStyle() == 5) {
            return "北欧风";
        } else if (getDecorationStyle() == 6) {
            return "意式极简";
        } else if (getDecorationStyle() == 7) {
            return "地中海";
        } else if (getDecorationStyle() == 8) {
            return "工业风";
        } else if (getDecorationStyle() == 9) {
            return "欧式";
        } else if (getDecorationStyle() == 10) {
            return "美式";
        }
        return "其他";

    }

    public Double getOrderAmount() {
        return orderAmount == null ? 0 : orderAmount;
    }

    public void setOrderAmount(Double orderAmount) {
        this.orderAmount = orderAmount;
    }

    public String getDecorationAddress() {
        return decorationAddress == null ? "" : decorationAddress;
    }

    public void setDecorationAddress(String decorationAddress) {
        this.decorationAddress = decorationAddress;
    }

    public List<String> getTagList() {
        List<String> list = new ArrayList<>();
        if (getDecorationArea() > 0) {
            list.add(String.format("%s平米", getDecorationArea()));
        }
        list.add(getDecorationStyleStr());
        if (getOrderAmount() > 0) {
            list.add(String.format("%s元", getOrderAmount()));
        }
        return list;
    }
}
